home *** CD-ROM | disk | FTP | other *** search
Wrap
VERSION 5.00 Object = "{13E51000-A52B-11D0-86DA-00608CB9FBFB}#5.0#0"; "VCF15.OCX" Begin VB.Form Form1 Caption = "Events" ClientHeight = 7470 ClientLeft = 60 ClientTop = 345 ClientWidth = 9885 LinkTopic = "Form1" ScaleHeight = 7470 ScaleWidth = 9885 StartUpPosition = 2 'CenterScreen Begin VB.CheckBox chkGotLostFocus Caption = "Got/Lost Focus" Height = 315 Left = 3780 TabIndex = 31 Top = 4965 Value = 1 'Checked Width = 1440 End Begin VB.CheckBox chkMouseEvents Caption = "Mouse Events" Height = 315 Left = 3780 TabIndex = 30 Top = 4680 Value = 1 'Checked Width = 1365 End Begin VB.CheckBox chkKeyEvents Caption = "Key Events" Height = 315 Left = 3780 TabIndex = 29 Top = 5250 Value = 1 'Checked Width = 1365 End Begin VB.Frame Frame2 Caption = "Other Events" Height = 1230 Left = 3630 TabIndex = 28 Top = 4440 Width = 1725 End Begin VB.CommandButton btnReplace Caption = "Replace" Height = 225 Left = 45 TabIndex = 27 Top = 4785 Width = 915 End Begin VB.CommandButton btnFindReplace Caption = "Find" Height = 225 Left = 45 TabIndex = 26 Top = 4530 Width = 915 End Begin VB.CheckBox chkModified Caption = "Modified" Height = 270 Left = 1125 TabIndex = 25 Top = 4500 Width = 975 End Begin VB.CommandButton ClearEvents Caption = "Clear Events" Height = 285 Left = 5415 TabIndex = 24 Top = 60 Width = 1065 End Begin VB.ListBox lstEvents Height = 5325 Left = 5415 TabIndex = 23 Top = 375 Width = 4440 End Begin VB.CheckBox chkStartEdit Caption = "DoStartEdit" Height = 315 Left = 2070 TabIndex = 17 Top = 6540 Value = 1 'Checked Width = 1365 End Begin VB.CheckBox chkSelChange Caption = "DoSelChange" Height = 315 Left = 8040 TabIndex = 16 Top = 6255 Value = 1 'Checked Width = 1425 End Begin VB.CheckBox chkTopLeftChanged Caption = "DoTopLeftChanged" Height = 315 Left = 8040 TabIndex = 15 Top = 6540 Value = 1 'Checked Width = 1770 End Begin VB.CheckBox chkStartRecalc Caption = "DoStartRecalc" Height = 315 Left = 3945 TabIndex = 14 Top = 6255 Value = 1 'Checked Width = 1365 End Begin VB.CheckBox chkObjValueChanged Caption = "DoObjValueChanged" Height = 315 Left = 5730 TabIndex = 13 Top = 7110 Value = 1 'Checked Width = 1830 End Begin VB.CheckBox chkRClick Caption = "DoRClick" Height = 315 Left = 240 TabIndex = 12 Top = 6540 Value = 1 'Checked Width = 1230 End Begin VB.CheckBox chkRDblClick Caption = "DoRDblClick" Height = 315 Left = 240 TabIndex = 11 Top = 6825 Value = 1 'Checked Width = 1230 End Begin VB.CheckBox chkSafeEvents Caption = "DoSafeEvents" Height = 315 Left = 8040 TabIndex = 10 Top = 5970 Width = 1425 End Begin VB.CheckBox chkObjClick Caption = "DoObjClick" Height = 315 Left = 5730 TabIndex = 9 Top = 5970 Value = 1 'Checked Width = 1230 End Begin VB.CheckBox chkObjDblClick Caption = "DoObjDblClick" Height = 315 Left = 5730 TabIndex = 8 Top = 6255 Value = 1 'Checked Width = 1470 End Begin VB.CheckBox chkObjGotFocus Caption = "DoObjGotFocus" Height = 315 Left = 5730 TabIndex = 7 Top = 6540 Value = 1 'Checked Width = 1470 End Begin VB.CheckBox chkObjLostFocus Caption = "DoObjLostFocus" Height = 315 Left = 5730 TabIndex = 6 Top = 6825 Value = 1 'Checked Width = 1575 End Begin VB.CheckBox chkEndRecalc Caption = "DoEndRecalc" Height = 315 Left = 3945 TabIndex = 5 Top = 5970 Value = 1 'Checked Width = 1320 End Begin VB.CheckBox chkCancelEdit Caption = "DoCancelEdit" Height = 315 Left = 2070 TabIndex = 4 Top = 5970 Value = 1 'Checked Width = 1365 End Begin VB.CheckBox chkEndEdit Caption = "DoEndEdit" Height = 315 Left = 2070 TabIndex = 3 Top = 6255 Value = 1 'Checked Width = 1230 End Begin VCF150Ctl.F1Book F1Book1 Height = 4290 Left = 45 TabIndex = 2 Top = 90 Width = 5265 _ExtentX = 9287 _ExtentY = 7567 _0 = $"Events.frx":0000 _1 = $"Events.frx":0405 _2 = $"Events.frx":080A _3 = $"Events.frx":0C0F _4 = $"Events.frx":1014 _count = 5 _ver = 1 End Begin VB.CheckBox chkDblClick Caption = "DoDblClick" Height = 315 Left = 240 TabIndex = 1 Top = 6255 Value = 1 'Checked Width = 1275 End Begin VB.CheckBox chkClick Caption = "DoClick" Height = 315 Left = 240 TabIndex = 0 Top = 5970 Value = 1 'Checked Width = 1230 End Begin VB.Frame Frame1 Caption = "Object Events" Height = 1725 Left = 5595 TabIndex = 18 Top = 5760 Width = 2010 End Begin VB.Frame Clicks Caption = "Click Events" Height = 1725 Left = 45 TabIndex = 19 Top = 5745 Width = 1605 End Begin VB.Frame Frame3 Caption = "Edit Events" Height = 1725 Left = 1890 TabIndex = 20 Top = 5745 Width = 1605 End Begin VB.Frame Frame4 Caption = "Recalc Events" Height = 1725 Left = 3765 TabIndex = 21 Top = 5745 Width = 1605 End Begin VB.Frame Frame5 Caption = "Misc. Events" Height = 1725 Left = 7845 TabIndex = 22 Top = 5760 Width = 2010 End Attribute VB_Name = "Form1" Attribute VB_GlobalNameSpace = False Attribute VB_Creatable = False Attribute VB_PredeclaredId = True Attribute VB_Exposed = False Option Explicit Dim ModifiedEvent As Boolean Private Sub Check3_Click() End Sub Private Sub btnFindReplace_Click() Dim pFound As Long On Error GoTo FindError F1Book1.Find "6", 1, 1, 1, 20, 20, F1FindByRows, pFound Exit Sub FindError: MsgBox Err.Description Resume Next End Sub Private Sub btnReplace_Click() Dim pFound As Long Dim pReplaced As Long On Error GoTo ReplaceError F1Book1.Replace "6", "7", 1, 1, 1, 20, 20, F1FindByRows, pFound, pReplaced Exit Sub ReplaceError: MsgBox Err.Description Resume Next End Sub Private Sub chkCancelEdit_Click() If chkCancelEdit = 1 Then F1Book1.DoCancelEdit = True Else F1Book1.DoCancelEdit = False End If End Sub Private Sub chkClick_Click() If chkClick = 1 Then F1Book1.DoClick = True Else F1Book1.DoClick = False End If End Sub Private Sub chkDblClick_Click() If chkDblClick = 1 Then F1Book1.DoDblClick = True Else F1Book1.DoDblClick = False End If End Sub Private Sub chkEndEdit_Click() If chkEndEdit = 1 Then F1Book1.DoEndEdit = True Else F1Book1.DoEndEdit = False End If End Sub Private Sub chkEndRecalc_Click() If chkEndRecalc = 1 Then F1Book1.DoEndRecalc = True Else F1Book1.DoEndRecalc = False End If End Sub Private Sub chkModified_Click() If Not ModifiedEvent Then F1Book1.Modified = False chkModified.Value = 0 End If ModifiedEvent = False End Sub Private Sub chkObjClick_Click() If chkObjClick = 1 Then F1Book1.DoObjClick = True Else F1Book1.DoObjClick = False End If End Sub Private Sub chkObjDblClick_Click() If chkObjDblClick = 1 Then F1Book1.DoObjDblClick = True Else F1Book1.DoObjDblClick = False End If End Sub Private Sub chkObjGotFocus_Click() If chkObjGotFocus = 1 Then F1Book1.DoObjGotFocus = True Else F1Book1.DoObjGotFocus = False End If End Sub Private Sub chkObjLostFocus_Click() If chkObjLostFocus = 1 Then F1Book1.DoObjLostFocus = True Else F1Book1.DoObjLostFocus = False End If End Sub Private Sub chkObjValueChanged_Click() If chkObjValueChanged = 1 Then F1Book1.DoObjValueChanged = True Else F1Book1.DoObjValueChanged = False End If End Sub Private Sub chkRClick_Click() If chkRClick = 1 Then F1Book1.DoRClick = True Else F1Book1.DoRClick = False End If End Sub Private Sub chkRDblClick_Click() If chkRDblClick = 1 Then F1Book1.DoRDblClick = True Else F1Book1.DoRDblClick = False End If End Sub Private Sub chkSafeEvents_Click() If chkSafeEvents = 1 Then F1Book1.DoSafeEvents = True Else F1Book1.DoSafeEvents = False End If End Sub Private Sub chkSelChange_Click() If chkSelChange = 1 Then F1Book1.DoSelChange = True Else F1Book1.DoSelChange = False End If End Sub Private Sub chkStartEdit_Click() If chkStartEdit = 1 Then F1Book1.DoStartEdit = True Else F1Book1.DoStartEdit = False End If End Sub Private Sub chkStartRecalc_Click() If chkStartRecalc = 1 Then F1Book1.DoStartRecalc = True Else F1Book1.DoStartRecalc = False End If End Sub Private Sub chkTopLeftChanged_Click() If chkTopLeftChanged = 1 Then F1Book1.DoTopLeftChanged = True Else F1Book1.DoTopLeftChanged = False End If End Sub Private Sub ClearEvents_Click() Dim x As Integer For x = 1 To lstEvents.ListCount lstEvents.RemoveItem 0 Next x End Sub Private Sub F1Book1_BeforeReplace(newString As String, ByVal nSheet As Long, ByVal nRow As Long, ByVal nCol As Long, pAction As Integer) Dim result As Integer result = MsgBox("Replace " & newString, vbYesNoCancel) If result = vbYes Then pAction = F1ReplaceYes ElseIf result = vbNo Then pAction = F1ReplaceNo Else pAction = F1ReplaceCancel End If lstEvents.AddItem "BeforeReplace -- newString=" & newString & " nSheet=" & nSheet & " nRow=" & nRow & " nCol=" & nCol & " pAction=" & pAction, 0 End Sub Private Sub F1Book1_CancelEdit() lstEvents.AddItem "CancelEdit", 0 End Sub Private Sub F1Book1_Click(ByVal nRow As Long, ByVal nCol As Long) lstEvents.AddItem "Click -- Row=" & nRow & " Col=" & nCol, 0 End Sub Private Sub F1Book1_DblClick(ByVal nRow As Long, ByVal nCol As Long) lstEvents.AddItem "DblClick -- Row=" & nRow & " Col=" & nCol, 0 End Sub Private Sub F1Book1_EndEdit(EditString As String, Cancel As Integer) Dim result As Integer lstEvents.AddItem "EndEdit -- EditString=" & EditString, 0 result = MsgBox("Do you wish to cancel Editing?", vbYesNo) If result = vbYes Then Cancel = True Exit Sub End If EditString = InputBox("Change the Value", , EditString) End Sub Private Sub F1Book1_EndRecalc() lstEvents.AddItem "EndRecalc", 0 End Sub Private Sub F1Book1_Found(ByVal nSheet As Long, ByVal nRow As Long, ByVal nCol As Long, pCancel As Integer) Dim result As Integer result = MsgBox("Cancel", vbYesNo) If result = vbYes Then pCancel = 1 ElseIf result = vbNo Then pCancel = 0 End If lstEvents.AddItem "Found -- nSheet=" & nSheet & " nRow=" & nRow & " nCol=" & nCol, 0 End Sub Private Sub F1Book1_GotFocus() If chkGotLostFocus = 1 Then lstEvents.AddItem "GotFocus", 0 End If End Sub Private Sub F1Book1_KeyDown(KeyCode As Integer, Shift As Integer) If chkKeyEvents = 1 Then lstEvents.AddItem "KeyDown -- KeyCode=" & KeyCode & " Shift=" & Shift, 0 End If End Sub Private Sub F1Book1_KeyPress(KeyAscii As Integer) If chkKeyEvents = 1 Then lstEvents.AddItem "KeyPress -- KeyAscii=" & KeyAscii, 0 End If End Sub Private Sub F1Book1_KeyUp(KeyCode As Integer, Shift As Integer) If chkKeyEvents = 1 Then lstEvents.AddItem "KeyUp -- KeyCode=" & KeyCode & " Shift=" & Shift, 0 End If End Sub Private Sub F1Book1_LostFocus() If chkGotLostFocus = 1 Then lstEvents.AddItem "LostFocus", 0 End If End Sub Private Sub F1Book1_Modified() lstEvents.AddItem "Modified", 0 ModifiedEvent = True chkModified.Value = 1 End Sub Private Sub F1Book1_MouseDown(Button As Integer, Shift As Integer, x As Single, y As Single) If chkMouseEvents = 1 Then lstEvents.AddItem "MouseDown -- Button=" & Button & " Shift=" & Shift & " x=" & x & " y=" & y, 0 End If End Sub Private Sub F1Book1_MouseMove(Button As Integer, Shift As Integer, x As Single, y As Single) If chkMouseEvents = 1 Then lstEvents.AddItem "MouseMove -- Button=" & Button & " Shift=" & Shift & " x=" & x & " y=" & y, 0 End If End Sub Private Sub F1Book1_MouseUp(Button As Integer, Shift As Integer, x As Single, y As Single) If chkMouseEvents = 1 Then lstEvents.AddItem "MouseDown -- Button=" & Button & " Shift=" & Shift & " x=" & x & " y=" & y, 0 End If End Sub Private Sub F1Book1_ObjClick(ObjName As String, ByVal ObjID As Long) lstEvents.AddItem "ObjClick -- ObjName=" & ObjName & " ObjID=" & ObjID, 0 End Sub Private Sub F1Book1_ObjDblClick(ObjName As String, ByVal ObjID As Long) lstEvents.AddItem "ObjDblClick -- ObjName=" & ObjName & " ObjID=" & ObjID, 0 End Sub Private Sub F1Book1_ObjGotFocus(ObjName As String, ByVal ObjID As Long) lstEvents.AddItem "ObjGotFocus -- ObjName=" & ObjName & " ObjID=" & ObjID, 0 End Sub Private Sub F1Book1_ObjLostFocus(ObjName As String, ByVal ObjID As Long) lstEvents.AddItem "ObjLostFocus -- ObjName=" & ObjName & " ObjID=" & ObjID, 0 End Sub Private Sub F1Book1_ObjValueChanged(ObjName As String, ByVal ObjID As Long) lstEvents.AddItem "ObjValueChanged -- ObjName=" & ObjName & " ObjID=" & ObjID, 0 End Sub Private Sub F1Book1_ODBCExecuteError(ByVal nRow As Long, ByVal nCol As Long, pAction As Integer) lstEvents.AddItem "ODBCExecuteError -- nRow=" & nRow & " nCol=" & nCol & " pAction=" & pAction, 0 End Sub Private Sub F1Book1_RClick(ByVal nRow As Long, ByVal nCol As Long) lstEvents.AddItem "RClick -- Row=" & nRow & " Col=" & nCol, 0 End Sub Private Sub F1Book1_RDblClick(ByVal nRow As Long, ByVal nCol As Long) lstEvents.AddItem "RDblClick -- Row=" & nRow & " Col=" & nCol, 0 End Sub Private Sub F1Book1_SafeBeforeReplace(newString As VCF150Ctl.IF1EventArg, ByVal nSheet As Long, ByVal nRow As Long, ByVal nCol As Long, Action As VCF150Ctl.IF1EventArg) lstEvents.AddItem "SafeBeforeReplace -- newString=" & newString & " nSheet=" & nSheet & " nRow=" & nRow & " nCol=" & nCol & " Action=" & Action, 0 End Sub Private Sub F1Book1_SafeEndEdit(EditString As VCF150Ctl.IF1EventArg, CancelFlag As VCF150Ctl.IF1EventArg) lstEvents.AddItem "SafeEndEdit -- EditString=" & EditString, 0 End Sub Private Sub F1Book1_SafeFound(ByVal nSheet As Long, ByVal nRow As Long, ByVal nCol As Long, CancelFlag As VCF150Ctl.IF1EventArg) lstEvents.AddItem "SafeFound -- nSheet=" & nSheet & " nRow=" & nRow & " nCol=" & nCol, 0 End Sub Private Sub F1Book1_SafeODBCExecuteError(ByVal nRow As Long, ByVal nCol As Long, Action As VCF150Ctl.IF1EventArg) lstEvents.AddItem "ODBCExecuteError -- nRow=" & nRow & " nCol=" & nCol & " Action=" & Action, 0 End Sub Private Sub F1Book1_SafeStartEdit(EditString As VCF150Ctl.IF1EventArg, CancelFlag As VCF150Ctl.IF1EventArg) lstEvents.AddItem "SafeStartEdit -- EditString=" & EditString, 0 End Sub Private Sub F1Book1_SafeValidationFailed(EntryString As VCF150Ctl.IF1EventArg, ByVal nSheet As Long, ByVal nRow As Long, ByVal nCol As Long, MessageString As VCF150Ctl.IF1EventArg, Action As VCF150Ctl.IF1EventArg) lstEvents.AddItem "SafeValidationFailed -- EntryString=" & EntryString & " nSheet=" & nSheet & " nRow=" & nRow & " nCol=" & nCol & " MessageString=" & MessageString & " Action=" & Action, 0 End Sub Private Sub F1Book1_SelChange() lstEvents.AddItem "SelChange", 0 End Sub Private Sub F1Book1_StartEdit(EditString As String, Cancel As Integer) Dim result As Integer lstEvents.AddItem "StartEdit -- EditString=" & EditString, 0 result = MsgBox("Do you wish to cancel Editing?", vbYesNo) If result = vbYes Then Cancel = True Exit Sub End If EditString = InputBox("Change the Default Value", , EditString) End Sub Private Sub F1Book1_StartRecalc() lstEvents.AddItem "StartRecalc", 0 End Sub Private Sub F1Book1_TopLeftChanged() lstEvents.AddItem "TopLeftChanged", 0 End Sub Private Sub F1Book1_ValidationFailed(pEntry As String, ByVal nSheet As Long, ByVal nRow As Long, ByVal nCol As Long, pShowMessage As String, pAction As Integer) lstEvents.AddItem "ValidationFailed -- pEntry=" & pEntry & " nSheet=" & nSheet & " nRow=" & nRow & " nCol=" & nCol & " pShowMessage=" & pShowMessage & " pAction=" & pAction, 0 End Sub Private Sub Form_Load() F1Book1.Modified = False ModifiedEvent = False End Sub